---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.12.0
  labels:
    heritage: deckhouse
    module: node-manager
    cluster.x-k8s.io/provider: infrastructure-static
    cluster.x-k8s.io/v1beta1: v1alpha1
  name: staticmachinetemplates.infrastructure.cluster.x-k8s.io
spec:
  group: infrastructure.cluster.x-k8s.io
  names:
    kind: StaticMachineTemplate
    listKind: StaticMachineTemplateList
    plural: staticmachinetemplates
    singular: staticmachinetemplate
  scope: Namespaced
  versions:
    - name: v1alpha1
      schema:
        openAPIV3Schema:
          description: StaticMachineTemplate is the Schema for the Cluster API Provider Static
          properties:
            apiVersion:
              description: 'APIVersion defines the versioned schema of this representation
              of an object. Servers should convert recognized schemas to the latest
              internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
              type: string
            kind:
              description: 'Kind is a string value representing the REST resource this
              object represents. Servers may infer this from the endpoint the client
              submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
              type: string
            metadata:
              type: object
            spec:
              description: StaticMachineTemplateSpec defines the desired state of StaticMachineTemplate
              properties:
                template:
                  properties:
                    metadata:
                      description: "ObjectMeta is metadata that all persisted resources
                      must have, which includes all objects users must create. This
                      is a copy of customizable fields from metav1.ObjectMeta. \n
                      ObjectMeta is embedded in `Machine.Spec`, `MachineDeployment.Template`
                      and `MachineSet.Template`, which are not top-level Kubernetes
                      objects. Given that metav1.ObjectMeta has lots of special cases
                      and read-only fields which end up in the generated CRD validation,
                      having it as a subset simplifies the API and some issues that
                      can impact user experience. \n During the [upgrade to controller-tools@v2](https://github.com/kubernetes-sigs/cluster-api/pull/1054)
                      for v1alpha2, we noticed a failure would occur running Cluster
                      API test suite against the new CRDs, specifically `spec.metadata.creationTimestamp
                      in body must be of type string: \"null\"`. The investigation
                      showed that `controller-tools@v2` behaves differently than its
                      previous version when handling types from [metav1](k8s.io/apimachinery/pkg/apis/meta/v1)
                      package. \n In more details, we found that embedded (non-top
                      level) types that embedded `metav1.ObjectMeta` had validation
                      properties, including for `creationTimestamp` (metav1.Time).
                      The `metav1.Time` type specifies a custom json marshaller that,
                      when IsZero() is true, returns `null` which breaks validation
                      because the field isn't marked as nullable. \n In future versions,
                      controller-tools@v2 might allow overriding the type and validation
                      for embedded types. When that happens, this hack should be revisited."
                      properties:
                        annotations:
                          additionalProperties:
                            type: string
                          description: 'Annotations is an unstructured key value map
                          stored with a resource that may be set by external tools
                          to store and retrieve arbitrary metadata. They are not queryable
                          and should be preserved when modifying objects. More info:
                          http://kubernetes.io/docs/user-guide/annotations'
                          type: object
                        labels:
                          additionalProperties:
                            type: string
                          description: 'Map of string keys and values that can be used
                          to organize and categorize (scope and select) objects. May
                          match selectors of replication controllers and services.
                          More info: http://kubernetes.io/docs/user-guide/labels'
                          type: object
                      type: object
                    spec:
                      properties:
                        labelSelector:
                          description: A label selector is a label query over a set
                            of resources. The result of matchLabels and matchExpressions
                            are ANDed. An empty label selector matches all objects.
                            A null label selector matches no objects.
                          properties:
                            matchExpressions:
                              description: matchExpressions is a list of label selector
                                requirements. The requirements are ANDed.
                              items:
                                description: A label selector requirement is a selector
                                  that contains values, a key, and an operator that
                                  relates the key and values.
                                properties:
                                  key:
                                    description: key is the label key that the selector
                                      applies to.
                                    type: string
                                  operator:
                                    description: operator represents a key's relationship
                                      to a set of values. Valid operators are In, NotIn,
                                      Exists and DoesNotExist.
                                    type: string
                                  values:
                                    description: values is an array of string values.
                                      If the operator is In or NotIn, the values array
                                      must be non-empty. If the operator is Exists or
                                      DoesNotExist, the values array must be empty.
                                      This array is replaced during a strategic merge
                                      patch.
                                    items:
                                      type: string
                                    type: array
                                required:
                                  - key
                                  - operator
                                type: object
                              type: array
                            matchLabels:
                              additionalProperties:
                                type: string
                              description: matchLabels is a map of {key,value} pairs.
                                A single {key,value} in the matchLabels map is equivalent
                                to an element of matchExpressions, whose key field is
                                "key", the operator is "In", and the values array contains
                                only "value". The requirements are ANDed.
                              type: object
                          type: object
                          x-kubernetes-map-type: atomic
                      type: object
                  required:
                    - spec
                  type: object
              required:
                - template
              type: object
          type: object
      served: true
      storage: true
